export default {
  state: {
    userId: null,
    userCode: null,
    userName: null,
    nickName: null,
    userType: null,
    avatarUrl: null,
    departName: null,
    departId: null,
    email: null,
    parentUserName: null,
    telephone: null,
    avatarBase64: null
  },
  mutations: {
    UPDATE_USER(state, user) {
      state.userId = user.userId || '';
      state.userCode = user.userCode || '';
      state.userName = user.userName || '';
      state.nickName = user.nickName || '';
      state.userType = user.userType || '';
      state.avatarUrl = user.avatarUrl || '';
      state.departId = user.departId || '';
      state.departName = user.departName || '';
      state.email = user.email || '';
      state.parentUserName = user.parentUserName || '';
      state.telephone = user.telephone || '';
      state.avatarBase64 = user.avatarBase64 || '';
    }
  }
};
